﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;

namespace engine
{
    public class SceneManager
    {
        public SceneManager()
        {
            scenes = new List<Scene>();
        }

        public void Initialize()
        {

        }

        public void LoadContent()
        {

        }

        public void Update(GameTime dt)
        {
            if (activeScene != null)
                activeScene.Update(dt);
        }

        public void Draw(GameTime dt)
        {
            if (activeScene != null)
                activeScene.Draw(dt);
        }

        public Scene AddScene()
        {
            Scene scene = new Scene();
            scenes.Add(scene);
            //scene.Initialize();
            //scene.LoadContent();
            return scene;
        }

        public void SetActiveScene(Scene scene)
        {
            if (!scenes.Contains(scene))
            {
                throw new Exception("Scene doesn't belong to SceneManager");
            }
            activeScene = scene;
        }

        List<Scene> scenes;
        Scene activeScene;
    }
}
